package com.wz.jiangsu.main.string;


public class GetIntSize {
    private static int size = 0;

    public static void main(String[] args) {
        int[] hours = {12, 12, 30, 24, 24};
        int size = getdat(hours);
        System.out.println("size = " + size);
    }

    private static int getdat(int[] hours) {
        int length = hours.length;
        int size = 0;
        for (int i = 0; i < length -1 ; i++) {
            for (int j = i +1 ; j < length; j++) {
                int temp = (hours[i] + hours[j]) % 24 ;
                if (temp == 0) {
                    size++;
                }
            }
        }
        return size;
    }


}
